load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "algorithm",
    srcs = [
        "base_alg.cc",
    ],
    hdrs = [
        "base_alg.h",
        "async_alg.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/common:common",
        "//air_service/modules/perception-usecase/usecase/common:factory",
        "//air_service/modules/perception-usecase/usecase/common:semaphore",
        "//air_service/modules/perception-usecase/usecase/common:timer",
        ":config_manager",
        ":frame_data",
    ],
)

cc_library(
    name = "config_manager",
    srcs = [
        "config_manager.cc",
    ],
    hdrs = [
        "config_manager.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/common:common",
        "//base/common:base_common",
        ":meta_data",
        "@yaml_cpp//:yaml_cpp",
    ],
)


cc_library(
    name = "event_collector",
    srcs = [
        "event_collector.cc",
    ],
    hdrs = [
        "event_collector.h",
    ],
    deps = [
        "//base/common:base_common",
        "//air_service/modules/perception-usecase/usecase/common:tensor",
        "//air_service/modules/perception-usecase/usecase/common:factory",
        "//air_service/modules/proto:perception_cc_pb",
        ":config_manager",
    ],
)

cc_library(
    name = "frame_data",
    srcs = [
        "frame_data.cc",
    ],
    hdrs = [
        "frame_data.h",
    ],
    deps = [
        "//base/io:base_io",
        "//air_service/modules/perception-usecase/usecase/common:common",
        "//air_service/modules/perception-usecase/usecase/common:timer",
        "//air_service/modules/perception-usecase/usecase/common:util",
        "//air_service/modules/perception-usecase/proto:roi_lane_cc_pb",
        ":event_collector",
        ":tracked_obj",
        "@opencv//:opencv",
    ],
)

cc_library(
    name = "meta_data",
    hdrs = [
        "meta_data.h",
    ],
    deps = [
        "//base/common:base_common",
        "//air_service/modules/perception-usecase/usecase/common:tensor",
    ],
)


cc_library(
    name = "runner",
    srcs = [
        "runner.cc",
    ],
    hdrs = [
        "runner.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/common:common",
        "//air_service/modules/perception-usecase/usecase/common:timer",
        "//air_service/modules/perception-usecase/usecase/common:semaphore",
        ":algorithm",
        ":frame_data",
    ],
)

cc_library(
    name = "tracked_obj",
    srcs = [
        "tracked_obj.cc",
    ],
    hdrs = [
        "tracked_obj.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/common:tensor",
        "//air_service/modules/proto:perception_cc_pb",
        ":meta_data",
    ],
)

